home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d17 / showpcl.arc / READ.ME < prev    next >
Text File  |  1990-02-18  |  10KB  |  218 lines

  1.  
  2. ┌───────────────────────────────────┬──────────────────────────────────┐  
  3. │SHOWPCL.EXE - analyse HP-PCL-Files │ Ver 1.4, W. Strobl, Bonn 90/02/14│ 
  4. └───────────────────────────────────┴──────────────────────────────────┘  
  5.                                                      
  6.          ╔══════════════════════════════════════════════════╗
  7.          ║ Usage:                                           ║   
  8.          ║      showpcl [-f] [-b] [-a] INPUTFILE            ║   
  9.          ║                                                  ║
  10.          ║ -f   do not analyse font headers (softfonts)     ║
  11.          ║ -b   dump binary data (i.e. graphics,            ║
  12.          ║      font headers)                               ║
  13.          ║ -a   do not use ANSI escape sequences            ║
  14.          ║      (useful for output redirection and on       ║
  15.          ║      monochrome screens)                         ║
  16.          ║                                                  ║
  17.          ║ Output goes to standard output                   ║
  18.          ╚══════════════════════════════════════════════════╝ 
  19.  
  20. Background and Purpose
  21. ----------------------
  22.  
  23. PCL is a family of printer command languages (coded as escape sequences)
  24. designed by Hewlett Packard for control of their printers.  It is a
  25. successful compromise between device independence and interpretation 
  26. efficiency.
  27.  
  28. SHOWPCL interprets this PCL data and displays it in three columns. The
  29. following is a sample output:
  30.  
  31. ┌────────────────────────────────┬───────────────┬──────────────────────┐    
  32. │                      Operation │        Operand│Text data             │
  33. ├────────────────────────────────┼───────────────┼──────────────────────┤
  34. │                                │               │                      │ 
  35. │                          Reset │               │                      │
  36. │               Number of Copies │              1│                      │
  37. │                       Portrait │               │                      │
  38. │            Page Length (Lines) │             70│                      │
  39. │                 Lines Per Inch │              4│                      │
  40. │                     Top Margin │              1│                      │
  41. │                    Text Length │             45│                      │
  42. │                 Feed from Tray │               │                      │
  43. │                        Primary │               │                      │
  44. │                     Symbol Set │   ISO 6: ASCII│                      │
  45. │                        Primary │               │                      │
  46. │                  Typeface Helv │               │                      │
  47. │                  Stroke Weight │              1│                      │
  48. │                  Style Upright │               │                      │
  49. │                     Point Size │          14.40│                      │
  50. │           Proportional Spacing │               │                      │
  51. │   Position to Row (dezipoints) │            677│                      │
  52. │Position to Column (dezipoints) │            804│Dies                  │
  53. │Position to Column (dezipoints) │            +63│ist                   │
  54. │Position to Column (dezipoints) │            +62│ein                   │
  55. │Position to Column (dezipoints) │            +63│Scheit,               │
  56. │...                             │               │                      │ 
  57. └────────────────────────────────┴───────────────┴──────────────────────┘ 
  58.  
  59.  
  60.  
  61. is the result of applying SHOWPCL to the this data:
  62.  
  63. 0000  1B 45 1B 26 6C 31 58 1B 26 6C 30 6F 37 30 70 34  *.E.&l1X.&l0o70p4*
  64. 0010  64 31 65 34 35 46 1B 26 6C 31 48 1B 28 30 55 1B  *d1e45F.&l1H.(0U.*
  65. 0020  28 73 34 74 31 62 30 73 31 34 2E 34 30 76 31 50  *(s4t1b0s14.40v1P*
  66. 0030  1B 26 61 36 37 37 56 1B 26 61 38 30 34 48 44 69  *.&a677V.&a804HDi*
  67. 0040  65 73 20 1B 26 61 2B 36 33 48 69 73 74 20 1B 26  *es .&a+63Hist .&*
  68. 0050  61 2B 36 32 48 65 69 6E 20 1B 26 61 2B 36 33 48  *a+62Hein .&a+63H*
  69. 0060  53 63 68 65 69 74 2C 20 1B 26 61 2B 36 32 48 65  *Scheit, .&a+62He*
  70. ...
  71.  
  72.  
  73. What SHOWPCL does
  74. -----------------
  75.  
  76. SHOWPCL understands most PCL escape sequences: printer control,
  77. graphics, soft fonts.  It takes one argument, the file name of the file
  78. that contains the data sent to a PCL printer.  It disassembles that
  79. data and sends its interpretation to the standard output, normally to
  80. the PC screen.  The output is (roughly) separated into three colums:
  81. column one contains the verbose description of an operation.  Column
  82. two shows the operand of this operation.  Column three is used for
  83. uninterpreted text data, if there is any.  All three columns have
  84. different colors, if this isn't disabled with the -a flag.
  85.  
  86. Some kind of data (which is recognized by looking at the operations) is
  87. dumped in classic dump format, if requested by the -b flag.  This
  88. applies to graphic data.  It applies to font headers, too, of their
  89. interpretation is inhibited by the -f flag.
  90.  
  91. So
  92.         ┌──────────────────────────────────────────┐        
  93.         │showpcl bla.prn                           │
  94.         └──────────────────────────────────────────┘        
  95.                                             
  96. shows everything but graphics data.
  97.  
  98.         ┌──────────────────────────────────────────┐ 
  99.         │showpcl -b bla.prn                        │
  100.         └──────────────────────────────────────────┘
  101.  
  102. shows the graphics data, too.                       
  103.  
  104.         ┌──────────────────────────────────────────┐
  105.         │showpcl -f bla.prn                        │
  106.         └──────────────────────────────────────────┘ 
  107.  
  108. doesn't interpret any soft font headers, it tells about their
  109. existence only.
  110.          
  111.         ┌──────────────────────────────────────────┐ 
  112.         │showpcl -b -f bla.prn                     │
  113.         └──────────────────────────────────────────┘
  114.                                                     
  115. dump's graphics data and uninterpreted font headers, if there
  116. are any.
  117.          
  118.  
  119.         ┌──────────────────────────────────────────┐ 
  120.         │showpcl -a -b -f bla.prn                  │
  121.         └──────────────────────────────────────────┘
  122.  
  123. does this without inserting ANSI escape sequences, which is
  124. especially useful if you use this in the form
  125.          
  126.         ┌──────────────────────────────────────────┐ 
  127.         │showpcl -a bla.prn > bla.dmp              │
  128.         └──────────────────────────────────────────┘
  129. or                                                  
  130.          
  131.         ┌──────────────────────────────────────────┐ 
  132.         │showpcl -a bla.prn | list /s              │
  133.         └──────────────────────────────────────────┘
  134.  
  135. The last example assumes that you have Vernon Buerg's LIST somewhere
  136. in your path. A batch procedure containing
  137.                                                     
  138.         ╔═══════════════════════════════LISTPCL.BAT╗
  139.         ║ @echo off                                ║  
  140.         ║ showpcl -a %1 %2 %3 | list /s            ║
  141.         ╚══════════════════════════════════════════╝ 
  142.  
  143. is supplied within the SHOWPCL archive under the name LISTPCL.BAT.
  144. It acts as a simple browser for PCL files.
  145.  
  146.  
  147.  
  148. What SHOWPCL doesn't
  149. --------------------
  150.  
  151. There should be an option to have a fourth column displaying the
  152. input data (like the first column of assemblers/disassemblers). There
  153. should be a builtin browsing capability, i.e. the ability to scroll 
  154. forward and backward. A display of the current byte position 
  155. in the input data would be nice.
  156.  
  157. Like real PCL printers SHOWPCL is not very good if you try to bug it
  158. with faulty PCL files.  It is a tool to look at usable PCL files, in
  159. order to understand what is going on.  At the current time it is not
  160. intended as a fail-safe tool to debug faulty PCL files.
  161.  
  162. The disassembler itself may contain bugs; I haven't tested it much. 
  163. It's main purpose is to look at big PCL files in order understand what
  164. is going on, in order to see quickly what the author of the printer
  165. driver which produced the output was trying to do. In doubt check your
  166. data manually. Please report any bugs or interpretation errors to
  167. me, via Email (STROBL@DBNGMD21.BITNET).
  168.  
  169.  
  170.  
  171. History
  172. -------
  173.  
  174. SHOWPCL was written shortly after I got a DeskJet Plus for my office
  175. and purchased another one for use at home.  After staring at some printer
  176. outputs made for LaserJet's and checking them against my DeskJet manual
  177. I thougth that it was time for yet another tool: a PCL disassembler.
  178.  
  179. I started with two manuals: a copy of a HP-LaserJet Technical Reference
  180. Manual and my own DeskJet manual.  My intention was to create a tool
  181. which could discriminate between the different PCL variants, by
  182. displaying them in different colors.  After checking the two manuals I
  183. discovered that
  184.  
  185.  - LaserJet Softfonts and DeskJet Softfonts are different
  186.  
  187.  - the LaserJet Technical Reference Manual has a softfont 
  188.    description
  189.  
  190.  - the DeskJet manual has no softfont description
  191.  
  192.  - there was no Deskjet Technical Reference Manual (at that time)
  193.  
  194. Therefore I changed my approach and did a LaserJet PCL disassembler
  195. first, adding DeskJet softfonts later.
  196.  
  197. While programming and using this disassembler I tried to acquire more
  198. information about the DeskJet.  HP was very helpful and sent me a copy
  199. of their DeskJet Software Developer's Guide.  Beside other things I
  200. used it to add DeskJet Softfont interpretation to the disassembler. 
  201. Still missing is the interpretation of a few DeskJet specific escape
  202. sequences.
  203.  
  204. In fact, the actual use of this tool was not so much debugging of
  205. my own DeskJet data, but helping some of my colleagues debugging 
  206. their LaserJet driver's output.
  207.  
  208.  
  209. Status
  210. ------
  211.  
  212. I donate this program to the public domain. There are no
  213. warranties. Use this program at your own risk.
  214.  
  215.  
  216.                         Wolfgang Strobl, 18. Februar 1990, Bonn, FRG.
  217.  
  218.